<?php
namespace app\common\model;

use think\Model;
use think\Db;
use think\Config;
use think\Loader;
class Practice extends Model
{
    // 指定表名,不含前缀
    protected $name = 'practice';



    /**
     * 获得学习
     */
    public function subject($id=0){
        if($id){
            $arr=Db::name('practice')->where('id',$id)->select();
            return $arr;
        }else{
            $arr=Db::name('practice')->select();
            return $arr;
        }
    }
}
